package com.example.boot.modules.system.convert;

import com.example.boot.modules.system.dto.ClientDto;
import com.example.boot.modules.system.entity.Client;
import com.example.boot.modules.system.vo.ClientVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author 王令
 * @since 2023/2/15
 */
@Mapper
public interface ClientConvert {

    ClientConvert INSTANCE = Mappers.getMapper(ClientConvert.class);

    @Mapping(target = "additionalInformation", ignore = true)
    Client toClientDto(ClientDto clientDto);

    ClientVo toClientVo(Client client);

    List<ClientVo> toClientVoList(List<Client> clients);
}
